package com.example.mqtt.service;

import com.example.mqtt.gateway.MqttGateway;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

@Component
public class PubService {
    @Resource
    private MqttGateway mqttGateway;

    public void sendMessage(String topic, String msg) {
        mqttGateway.sendToMqtt(topic, msg);
    }

    public void sendMessage(String topic, int qos, String msg) {
        mqttGateway.sendToMqtt(topic, qos, msg);
    }

}
